package com.ericzong.renamer.converter.string;

import com.ericzong.renamer.converter.IConverter;

public abstract class AbstractStringConverter implements IConverter
{
	protected int getIndex(int index, int length)
	{
		if(index >= 0)
		{
			return Math.min(index, length);
		}
		else
		{
			return Math.max(0, length + index);
		}
	}
}
